<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 拼接字符
        let str = 'abcderg';
        let newStr = 'hijklmn';
        console.log(str.concat(newStr));//abcderghijklmn

        // 替换字符
        console.log(str.replace('a', 'd'));//dbcderg


        // 截取字符
        console.log(str.substr(1, 4));//bcde    

        // 字符大小写
        console.log(str.toUpperCase());//ABCDERG
    </script>
</body>

</html>